{% extends 'CpmJovenesBundle:Layout:admin_layout.html.twig' %}

{% block title %}Eventos{% endblock %}

{% block content %}

		{{ filter.form_head(form) }}
	    {{form_row(form.modelFilter.cicloFilter.ciclo ) }}
		
		{{ filter.form_buttons(form) }}

<br/>
<table class="records_list">
    <thead>
        <tr>
	        <th>{{ filter.select_all() }}</th>
            <th>Ciclo</th>
            <th>Título</th>
            <th>Descripción</th>
            <th>Acciones</th>
        </tr>
    </thead>
    <tbody>
    {% for entity in entities %}
        <tr>
	        <td>{{ filter.select_this(entity) }}</td>
            <td>{{ entity.ciclo }}</td>
            <td>{{ entity.titulo }}</td>
            <td>{{ entity.descripcion }}</td>
            <td>
                <ul>
                    <li>
                        <a href="{{ path('evento_show', { 'id': entity.id }) }}">Ver</a>
                    </li>
                    {% if jym.puedeEditar(entity) %}
                    <li>
                        <a href="{{ path('evento_edit', { 'id': entity.id }) }}">Editar</a>
                    </li>
                    {% endif %}
                </ul>
            </td>
        </tr>
    {% endfor %}
    {% include "CpmJovenesBundle:Default:pagination.html.twig" %}
    </tbody>
</table>

<ul>
    <li>
        <a href="{{ path('evento_new') }}">
            Crear nuevo evento
        </a>
    </li>
</ul>


{{ form_row(form.batch_action) }} 
{{ form_row(form.batch_action_type) }}
 {{ form_row(form._token) }}
{{ filter.batch_actions([ 
	 {action:'CpmJovenesBundle:Evento:exportarEventosExcel', label: 'Exportar a Excel', confirm: false},
	 
	]) }}
	
{{ filter.form_end(form) }}
{% endblock %}